package com.kma.summer2012.dao;

import com.kma.summer2012.model.CrumbsRequest;
import com.kma.summer2012.model.CrumbsRequestAndWork;

import java.sql.SQLException;
import java.util.Collection;

public interface CrumbsRequestAndWorkDAO extends DAO<CrumbsRequestAndWork> {
    public void add(CrumbsRequestAndWork o) throws SQLException;

    public CrumbsRequestAndWork addWithReturn(CrumbsRequestAndWork o) throws SQLException;

    public void update(CrumbsRequestAndWork o) throws SQLException;

    public CrumbsRequestAndWork getById(int id) throws SQLException;

    public Collection<CrumbsRequestAndWork> getAll() throws SQLException;

    public Collection<CrumbsRequestAndWork> findByRequestID(CrumbsRequest request) throws SQLException;

    public Collection<CrumbsRequest> findByWorkId(int id) throws SQLException;

    public boolean workIsFree(int id) throws Exception;

    public void delete(CrumbsRequestAndWork o) throws SQLException;
}
